home *** CD-ROM | disk | FTP | other *** search
- @echo off
- echo off
- break on
- cls
- REM Version 1.0
- echo Installprogram - CPMONO01/CPMULT01 TeX-Macros - Version 1.0
- echo (c) Springer-Verlag GmbH & Co. KG, Heidelberg Berlin
- echo.
- if "%1"=="" goto fewparm
- if "%1"=="?" goto help
- if "%1"=="-?" goto help
- if "%1"=="/?" goto help
- if "%1"=="H" goto help
- if "%1"=="-H" goto help
- if "%1"=="/H" goto help
- if "%1"=="h" goto help
- if "%1"=="-h" goto help
- if "%1"=="/h" goto help
- if "%1"=="c" goto weiter1
- if "%1"=="C" goto weiter1
- if "%1"=="d" goto weiter1
- if "%1"=="D" goto weiter1
- goto fehler1
- :weiter1
- if "%2"=="mono" goto weiter2
- if "%2"=="MONO" goto weiter2
- if "%2"=="mult" goto weiter2
- if "%2"=="MULT" goto weiter2
- goto fehler2
- :weiter2
- set i=%instdrvpath%\
- if not "%i%"=="%instdrvpath%\" goto enverr
- if not exist %i%cp%201.ini goto fileerr
- if not exist %i%cpmomu01.doc goto fileerr
- if not exist %i%cpmomu01.ind goto fileerr
- if not exist %i%cpmomu01.ref goto fileerr
- if NOT exist %1:\nul goto diskerr0
- if NOT "%i%"=="\" echo Installing from [drive,directory]: %i%
- echo Installing onto [drive,directory]: %1:\CP%201
- echo.
- if not exist %1:\cp%201\nul goto kopiere
- if not exist %1:\cp%201\cp%201.ini goto kopiere
- :info
- echo Files needed for the INITEX run are already on your hard disk.
- echo If you wish to completely reinstall the package please abort
- echo by pressing ^C (CONTROL C), delete the directory
- echo %1:\CP%201 and start the installation procedure again.
- echo Otherwise press RETURN and the files on the hard disk are used.
- pause
- goto kopiert
- :kopiere
- if NOT exist %1:\cp%201\nul md %1:\cp%201
- if NOT exist %1:\cp%201\nul goto diskerr1
- copy %i%cpmomu01.ind %1:\cp%201\cpmomu01.ind > nul
- if not exist %1:\cp%201\cpmomu01.ind goto diskerr2
- echo Creating the CP%201 package. Please wait!
- copy %i%cp%201.ini %1:\cp%201\cp%201.ini > nul
- echo .
- copy %i%cpmomu01.doc %1:\cp%201\cpmomu01.doc > nul
- echo .
- copy %i%cpmomu01.ref %1:\cp%201\cpmomu01.ref > nul
- echo .
- copy %i%sprmindx.sty %1:\cp%201 > nul
- :kopiert
- if "%3"=="y" goto amsinst
- if "%3"=="Y" goto amsinst
- goto machtex
- :amsinst
- echo.
- echo Installing the AMS symbol fonts and the fraktur font.
- if "%i%"=="\" goto ams1
- :amswrodi
- echo It only makes sense when installing the AMS fonts from the root
- echo directory of the disk marked "CPMOMU01 #1" - this is not the case.
- echo Skipping font installation...
- goto machtex
- :ams0
- if "%i%"=="1" goto amswrodi
- echo The AMS fonts installation program is not found
- echo in the current drive/directory which is:
- CD
- set i=1
- :ams1
- echo Please make sure diskette marked "CPMOMU01 #1" is inserted in drive A:
- pause
- if not exist finstall.exe goto ams0
- finstall.exe
- :machtex
- %1:
- cd \cp%201
- echo.
- echo Running INITEX on %1:\cp%201\cp%201.ini
- echo with the command: tex cp%201.ini /i
- echo if this fails, please try manually.
- tex cp%201.ini /i
- goto ende
- :enverr
- echo Cannot allocate additional environmental space
- echo (space used by the DOS command SET),
- echo please enlage this space (check DOS command SHELL) and restart.
- goto help0
- :fileerr
- echo Files needed for the installation are not found in
- echo in the searched drive/directory which is:
- echo %i%
- echo Change the default drive/directory and restart.
- echo.
- if NOT "%instdrvpath%"=="" goto fileerr1
- echo You did not set the DOS environment variable INSTDRVPATH.
- :fileerr1
- echo If you are installing the package from an other drive/directory
- echo than A:\ you have to make known this to the installing procedure,
- echo see explanation below.
- goto help0
- :fehler1
- echo Drive %1 is not supported, use only C or D (without a colon)!
- goto help0
- :fehler2
- if "%2"=="" goto fewparm2
- echo Second parameter (package type): "%2" is invalid,
- echo choose either MONO or MULT.
- goto help0
- :diskerr0
- echo Cannot access drive %1:!
- goto help0
- :diskerr1
- echo Cannot create directory \CP%201 on drive %1:!
- goto help0
- :diskerr2
- echo Cannot access directory \CP%201 on drive %1:!
- goto help0
- :fewparm
- echo You must supply the letter of the hard drive
- echo where the package is to be installed on as well
- echo as the type of the desired package.
- goto help0
- :fewparm2
- echo You must specify the type of the desired package.
- goto help0
- :help0
- echo.
- echo For more help please
- pause
- :help
- echo.
- echo Usage: "INSTALL <drive> <type> [install fonts]"
- echo.
- echo drive use C or D to install the macros on your harddisk
- echo type specify MONO for single author books
- echo or MULT for multi author books
- echo install fonts type Y if you like to install the
- echo AMS symbol fonts and fraktur fonts,
- echo default is N = not installing the fonts
- echo.
- echo Default drive to install from is A:
- echo default directory to install from is \ (root directory)
- echo change this by setting the environment variable "INSTDRVPATH"
- echo to your convenience before calling INSTALL.
- echo e.g.: SET INSTDRVPATH=C:\TEMP
- echo Note: If you specify any drive/directory other than the default,
- echo installation of the AMS fonts will not work.
- :ende
- set i=
- echo.
-